package cn.sumpu.app.guoguojie.web.mvc.stroll;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.sumpu.app.guoguojie.biz.StrollBiz;
import cn.sumpu.app.guoguojie.domain.Stroll;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;

@Controller
public class StrollFrontController {
	@Autowired
	private StrollBiz strollBiz;
	/* 逛街临时方案 */
	@RequestMapping(value = "/stroll.htm")
	public String forum(Integer page,String classId, HttpServletResponse response,
			HttpServletRequest request)throws AppBusinessException {
	    String strollId="stroll";
	   return getStrollClassByStrollId(strollId,response,request);
	}
	// 逛街的详细页面
	@RequestMapping(value = "/getStrollClassByStrollId.htm")
	public String getStrollClassByStrollId(String strollId,HttpServletResponse response, HttpServletRequest request)
			throws AppBusinessException { 
			Stroll stroll=strollBiz.selectStroll(strollId);
			
			request.setAttribute("stroll", stroll);
			return "v2/stroll/strollClassList";
	}
}
